<?php
if(!defined('IN_KKFRAME')) exit('Access Denied');
DB::query("CREATE TABLE IF NOT EXISTS `member` (
  `uid` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(12) NOT NULL,
  `password` varchar(32) NOT NULL,
  `email` varchar(32) NOT NULL,
  `cookie` text NOT NULL,
  PRIMARY KEY (`uid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;");

DB::query("CREATE TABLE IF NOT EXISTS `setting` (
  `k` varchar(32) NOT NULL,
  `v` varchar(64) NOT NULL,
  PRIMARY KEY (`k`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;");

DB::query("CREATE TABLE IF NOT EXISTS `songs` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `uid` int(10) NOT NULL,
  `title` varchar(128) NOT NULL,
  `artist` varchar(128) NOT NULL,
  `album` varchar(128) NOT NULL,
  `status` varchar(16) NOT NULL COMMENT '1-待提交,2-待审核,3-正常,4-高音质审核',
  `type` varchar(16) NOT NULL COMMENT '1-MP3渣音质,2-MP3高音质,3-FLAC无损',
  `fileserver_type` varchar(32) NOT NULL COMMENT 'vdisk-威盘,baidupcs-百度网盘,qiniu-七牛云存储',
  `fileserver_data` text NOT NULL COMMENT 'serialize',
  `process_type` VARCHAR(32) NOT NULL COMMENT 'vdisk-威盘,baidupcs-百度云',
  `process_low` TEXT NOT NULL COMMENT 'serialize',
  `process_high` TEXT NOT NULL COMMENT 'serialize',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;");

saveSetting('version', VERSION);
showmessage('Musical '.VERSION.' 安装成功！', './', 1);
?>
